package com.ymttest.common.entitie;

import java.lang.reflect.Field;

import com.ymttest.utils.DataUtil;
import com.ymttest.utils.YMTDateUtil;

/**
 * 订单评价信息
 */
public class OrderCreditInfo {
	// 状态
	private int Action;
	// 创建日期
	private String AddTime;

	// 订单评价id
	private long CreditDetailId;
	// 评价描述
	private String Description;

	// 是否是下单器订单相关评价
	private Boolean FromPurchaseAgent;

	// 买家ip
	private String Ip;
	// 好评度
	private int PraiseRange;
	// 卖家回复
	private String SellerReply;
	// 卖家回复时间
	private String SellerReplyUpdateTime;
	// 卖家的服务态度
	private double ServiceRange;
	// 与描述相符程度
	private double SimilarRange;
	private int Sort;
	// 评价相关订单号
	private String TargetId;
	// 卖家id
	private long TargetUserId;
	private int Type;
	// 更新日期
	private String UpdateTime;
	// 买家id
	private long UserId;

	public int getAction() {
		return Action;
	}

	public void setAction(int action) {
		Action = action;
	}

	public String getAddTime() {
		if (null != AddTime) {
			return YMTDateUtil.parseRespDate2(AddTime);
		}
		return AddTime;
	}

	public void setAddTime(String addTime) {
		if (null != addTime) {
			AddTime = YMTDateUtil.parseRespDate2(addTime);
		} else {
			AddTime = addTime;
		}
	}

	public long getCreditDetailId() {
		return CreditDetailId;
	}

	public void setCreditDetailId(long creditDetailId) {
		CreditDetailId = creditDetailId;
	}

	public String getDescription() {
		return Description;
	}

	public void setDescription(String description) {
		Description = description;
	}

	public Boolean getFromPurchaseAgent() {
		return FromPurchaseAgent;
	}

	public void setFromPurchaseAgent(Boolean fromPurchaseAgent) {
		FromPurchaseAgent = fromPurchaseAgent;
	}

	public String getIp() {
		return Ip;
	}

	public void setIp(String ip) {
		Ip = ip;
	}

	public int getPraiseRange() {
		return PraiseRange;
	}

	public void setPraiseRange(int praiseRange) {
		PraiseRange = praiseRange;
	}

	public String getSellerReply() {
		return SellerReply;
	}

	public void setSellerReply(String sellerReply) {
		SellerReply = sellerReply;
	}

	public String getSellerReplyUpdateTime() {
		return SellerReplyUpdateTime;
	}

	public void setSellerReplyUpdateTime(String sellerReplyUpdateTime) {
		SellerReplyUpdateTime = sellerReplyUpdateTime;
	}

	public double getServiceRange() {
		return ServiceRange;
	}

	public void setServiceRange(double serviceRange) {
		ServiceRange = serviceRange;
	}

	public double getSimilarRange() {
		return SimilarRange;
	}

	public void setSimilarRange(double similarRange) {
		SimilarRange = similarRange;
	}

	public int getSort() {
		return Sort;
	}

	public void setSort(int sort) {
		Sort = sort;
	}

	public String getTargetId() {
		return TargetId;
	}

	public void setTargetId(String targetId) {
		TargetId = targetId;
	}

	public long getTargetUserId() {
		return TargetUserId;
	}

	public void setTargetUserId(long targetUserId) {
		TargetUserId = targetUserId;
	}

	public int getType() {
		return Type;
	}

	public void setType(int type) {
		Type = type;
	}

	public String getUpdateTime() {
		if (null != UpdateTime) {
			return YMTDateUtil.parseRespDate2(UpdateTime);
		}
		return UpdateTime;
	}

	public void setUpdateTime(String updateTime) {
		if (null != updateTime) {
			UpdateTime = YMTDateUtil.parseRespDate2(updateTime);
		} else {
			UpdateTime = updateTime;
		}
	}

	public long getUserId() {
		return UserId;
	}

	public void setUserId(long userId) {
		UserId = userId;
	}

	public static void main(String[] args) {
		Class c = OrderCreditInfo.class;
		for (Field f : c.getDeclaredFields()) {
			String s = f.getName();
			System.out.println("DataUtil.verify(expect.get"
					+ DataUtil.toUpperCaseFirstOne(s) + "(), actual.get"
					+ DataUtil.toUpperCaseFirstOne(s) + "(),\"验证" + s + "\");");
		}
	}
}